package pl.edu.agh.sit.servlets;


import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author Prashant
 */
public class AndroidResponse extends HttpServlet {

    /**
	 * 
	 */
	private static final long serialVersionUID = -1177906527973792955L;

	@Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
        PrintWriter out=response.getWriter();
        String un,pw;
        un=request.getParameter("username");
        pw=request.getParameter("password");
        if(un.equalsIgnoreCase("mmrugala") && pw.equals("michal"))
            out.print(1);
        else
            out.print(0);
    }
}
